home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / cpcug.zip / NO.DOC < prev    next >
Text File  |  1987-04-20  |  5KB  |  99 lines

  1.           NO                                     Charles Petzold
  2.           Command
  3.           Copyright (c) 1986, Ziff-Davis Publishing Co.
  4.           ______________________________________________________
  5.  
  6.           Purpose:  Excludes specified files in a subdirectory
  7.                     from the action of a command.
  8.  
  9.           Format:   NO filespec Command [parameter]
  10.  
  11.           Remarks:  NO.COM is designed for situations in which
  12.                     you want to apply a command such as DELete or
  13.                     COPY to all the files in a directory except
  14.                     one or two (or a class of) files.  For
  15.                     example,
  16.  
  17.                          NO *.BAS COPY *.* A:
  18.  
  19.                     copies all the files in your current
  20.                     subdirectory to drive A: except for those
  21.                     that have a .BAS extension.
  22.  
  23.                     To exclude more than one file (or category)
  24.                     you must use a separate NO command for each
  25.                     on the command line.  Thus,
  26.  
  27.                          NO *.ASM NO *.COM DEL *.*
  28.  
  29.                     deletes all files in the current directory
  30.                     except those with .ASM or .COM extensions.
  31.  
  32.                     Notes:
  33.  
  34.                     1.   NO.COM should not be used in conjunction
  35.                          with the PC-DOS BACKUP and RESTORE
  36.                          commands.  This is because NO operates
  37.                          by temporarily setting the "hidden" file
  38.                          attribute bit on the files to be
  39.                          excluded from the main command, then
  40.                          unhiding the files after the main
  41.                          command has been executed.  Since the
  42.                          DOS BACKUP/RESTORE operation acts on
  43.                          hidden and unhidden files alike, NO.COM
  44.                          cannot be used to exclude files from
  45.                          BACKUP/RESTORE.  RESTORE, indeed, will
  46.                          restore the supposedly excluded files as
  47.                          hidden, overwriting the originals.
  48.  
  49.                     2.   While NO.COM provides full path support
  50.                          (and so requires the use of DOS 2.0 or
  51.                          later), it is a good policy when using
  52.                          NO to use CHDIR to make the directory
  53.                          that contains the files on which you
  54.                          wish to operate the current directory.
  55.  
  56.                          For example, suppose you are in your
  57.                          root directory, one of whose subdirec-
  58.                          tories is \BASIC.  If you were to enter
  59.                          the command
  60.  
  61.                               NO *.BAS DEL \BASIC\*.*
  62.  
  63.                                  Page -1-
  64.                          you would not delete all the files in
  65.                          the \BASIC subdirectory except those
  66.                          with a .BAS extension, as you might have
  67.                          intended to do.  To do this from the
  68.                          root directory you would have had to
  69.                          enter
  70.  
  71.                               NO \BASIC\*.BAS DEL \BASIC\*.*
  72.  
  73.                          This complete filespec would tell NO
  74.                          that it had to protect files in the
  75.                          \BASIC, not in the current (i.e., root)
  76.                          directory.
  77.  
  78.                          If you follow our recommendation and
  79.                          enter
  80.  
  81.                               CD \BASIC
  82.                               NO *.BAS DEL *.*
  83.  
  84.                          thus making \BASIC your current
  85.                          directory before you start deleting, you
  86.                          will then clean out all but the .BAS
  87.                          files, just as you intended.
  88.  
  89.                     3.   Should a parity check error, power
  90.                          outage, or system crash occur during the
  91.                          brief period between the times NO hides
  92.                          and subsequently unhides the protected
  93.                          files, those files will subsequently
  94.                          seem to have disappeared.  They are not
  95.                          lost; only hidden from a DIR listing.
  96.                          Use ATTR.COM (included in this set of
  97.                          utilities) to change their hidden
  98.                          status.
  99.